package ualrcdg.shared.dto;

/**
 * Simple implementation of the "update" object. See CDG XML Specifications: Game Descriptor Files.
 */
public class PropertyUpdate
{
	private final String id;
	private final String name;
	private final String propertyId;
	private final String updateType;
	private final String updateParameter;
	
	/**
	 * Primary constructor
	 *
	 * @param id the id of the PropertyUpdate object to be created
	 * @param name the name of the PropertyUpdate object to be created
	 * @param propertyId the propertyId of the PropertyUpdate object to be created
	 * @param updateType the updateType of the PropertyUpdate object to be created
	 * @param updateParameter the updateParameter of the PropertyUpdate object to be created
	 */
	public PropertyUpdate( String id, String name, String propertyId, String updateType, String updateParameter )
	{
		this.id = id;
		this.name = name;
		this.propertyId = propertyId;
		this.updateType = updateType;
		this.updateParameter = updateParameter;
		
		System.out.println( "Parsed: " + this.toString( ) );
	}
	
	/*
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString( )
	{
		return "PropertyUpdate [id=" + id + ", name=" + name + ", propertyId=" + propertyId + ", updateType=" + updateType + ", updateParameter=" + updateParameter + "]";
	}

	/**
	 * @return the id of this PropertyUpdate instance
	 */
	public String getId( )
	{
		return id;
	}
	
	/**
	 * @return the name of this PropertyUpdate instance
	 */
	public String getName( )
	{
		return name;
	}
	
	/**
	 * @return the propertyId of this PropertyUpdate instance
	 */
	public String getPropertyId( )
	{
		return propertyId;
	}

	/**
	 * @return the updateType of this PropertyUpdate instance
	 */
	public String getUpdateType( )
	{
		return updateType;
	}

	/**
	 * @return the updateParameter of this PropertyUpdate instance
	 */
	public String getUpdateParameter( )
	{
		return updateParameter;
	}
}
